<template>
  <div fixed>
    <van-nav-bar title="登录" left-arrow>
      <template #right></template>
    </van-nav-bar>
    <h2>优点达资讯</h2>
    <van-form @submit="onSubmit">
      <van-field
        v-model="mobile"
        label="用户名"
        placeholder="请输入手机号"
        left-icon="manager"
        :rules="[{ required: true, message: '请填写用户名' }]"
      />
      <van-field
        v-model="password"
        type="password"
        label="密码"
        placeholder="密码"
        left-icon="lock"
        :rules="[{ required: true, message: '请填写密码' }]"
      />
      <div style="margin: 16px">
        <van-button round block type="info" native-type="submit">
          提交
        </van-button>
      </div>
    </van-form>
    <a href="">没有账号,立即注册</a>
  </div>
</template>

<script>
export default {
  data() {
    return {
      mobile: '',
      password: '',
      password2: ''
    }
  },
  methods: {
    onSubmit(values) {
      console.log('submit', values)
    }
  }
}
</script>

<style lang="less" scoped>
h2 {
  color: #1989fa;
  font-weight: normal;
  text-align: center;
  margin-top: 20px;
  margin: 20px;
}
a {
  font-size: 14px;
  float: right;
  margin-right: 50px;
}
</style>
